class Todo:

    current_todo_id = 1

    @staticmethod
    def next_id():
        todo_id = Todo.current_todo_id
        Todo.current_todo_id += 1

        return todo_id

    def __init__(self, title: str = '', id=0, completed=False):
        self.id = id if id > 0 else Todo.next_id()
        self.title = title
        self.completed = completed
